{extend name="common/main"/}

{block name="style"}
<!--上传-->
<script type="text/javascript" charset="utf-8" src="__STATIC__/common/lib/webuploader/js/webuploader.js"></script>
<link href="__STATIC__/common/lib/webuploader/css/webuploader.css" type="text/css" rel="stylesheet">
{/block}
{block name="body"}
    <div class="main-title">
        <h2>应用编辑</h2>
    </div>

    <div class="with-padding">

        <section class="module-edit cards clearfix">
            <form action="" method="post" class="form-horizontal ajax-form" role="form">

                <input type="hidden" name="id" value="{$data['id']}">
                <div class="">
                    <div class="form-body">

                        <!--基础信息-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">应用名称</label>
                            <div class="form-controls col-sm-8">
                                <input type="text" class="form-control" name="alias" placeholder="请填写应用名称" value="{$data['alias']|default=''}">
                                <div class="help-block">请填写应用名称</div>
                            </div>
                        </div>
            
                        <div class="form-group">
                            <label class="col-sm-2 control-label">简短描述</label>
                            <div class="form-controls col-sm-8">
                                <textarea class="form-control" rows="3" name="summary" placeholder="请填写资料简短描述">{$data['summary']|default=''}</textarea>
                                <div class="help-block">请填写资料简短描述</div>
                            </div>
                        </div>
    
                        <div class="form-group">
                            <label class="col-sm-2 control-label">应用图标</label>
                            <div class="form-controls col-sm-8">
                                {:single_image_upload('icon', $data['icon'], false)}
                                <div class="help-block">封面建议尺寸：800*800px</div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">开发者</label>
                            <div class="form-controls col-sm-8">
                                <input type="text" class="form-control" name="developer" placeholder="请填写开发者名称" value="{$data['developer']|default=''}">
                                <div class="help-block">请填写开发者名称</div>
                            </div>
                        </div>
                            
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序</label>
                            <div class="form-controls col-sm-8">
                                <input type="number" class="form-control" name="sort" value="{$data['sort']|default=0}" placeholder="排序" max="255">
                                <div class="help-block">数字越大，越靠前，最大255。</div>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-2 control-label"></label>
                            <div class="form-controls col-sm-8">
                                <button type="submit" class="btn btn-lg btn-primary" data-role="submit">确认提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </section>

    </div>

{/block}
{block name="script"}

{/block}
